<?php

namespace App\Http\Controllers\Admin\Business\Repository;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * App\Http\Controllers\Admin\Business\Repository\ComboOrder
 *
 * @property int $id
 * @property int|null $combo_id 套餐id
 * @property int|null $activity_id 活动id
 * @property int|null $member_id
 * @property float|null $price 支付价格，不是套餐价格和活动价格，为最终的支付价格。
 * @property \Carbon\Carbon|null $created_at
 * @property \Carbon\Carbon|null $updated_at
 * @property string|null $deleted_at
 * @property string|null $outTradeNo
 * @property float|null $combo_price 原始价格
 * @property int|null $times 景点次数
 * @property string|null $thumb 套餐图片
 * @property int|null $is_refund 是否退款
 * @property int|null $is_choujiang 是否抽过奖
 * @property int|null $total_num
 * @property int|null $is_send 0未发放 1已发放
 * @property float|null $zhilv_price 智旅价格
 * @property-read \App\Http\Controllers\Admin\Business\Repository\ComboActivities|null $activity
 * @property-read \App\Http\Controllers\Admin\Business\Repository\Combo|null $combo
 * @property-read \App\Http\Controllers\Admin\Member\Repository\Member|null $member
 * @method static bool|null forceDelete()
 * @method static \Illuminate\Database\Query\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder onlyTrashed()
 * @method static bool|null restore()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereActivityId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereComboId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereComboPrice($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereIsChoujiang($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereIsRefund($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereIsSend($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereMemberId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereOutTradeNo($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder wherePrice($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereThumb($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereTimes($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereTotalNum($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereZhilvPrice($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder withTrashed()
 * @method static \Illuminate\Database\Query\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder withoutTrashed()
 * @mixin \Eloquent
 * @property string|null $send_time 门票发放时间
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Http\Controllers\Admin\Business\Repository\ComboOrder whereSendTime($value)
 */
class ComboOrder extends Model
{
    use SoftDeletes;

    protected $fillable=['combo_id','activity_id','member_id','price','outTradeNo','combo_price','times','thumb','total_num','zhilv_price','rate'];
    protected $table = 'combo_orders';
    protected $data = ['deleted_at'];
    public function combo(){
        return $this->belongsTo('App\Http\Controllers\Admin\Business\Repository\Combo','combo_id');
    }
    public function activity(){
        return $this->belongsTo('App\Http\Controllers\Admin\Business\Repository\ComboActivities','activity_id');
    }
    public function member(){
        return $this->belongsTo('App\Http\Controllers\Admin\Member\Repository\Member','member_id');
    }
}
